package server.command;

import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;

import communication.exception.VerifyParameterException;

public abstract class LaunchOfCommand {
public LaunchOfCommand(AnalysisCommand parsing){
	this.parsing=parsing;
	this.listAircraft.addAll(Arrays.asList(paramAircraft));
	this.listAirports.addAll(Arrays.asList(paramAirports));
	this.listBetweenDate.addAll(Arrays.asList(paramBetweenDate));
	this.listDate.addAll(Arrays.asList(paramDate));
	this.listId.addAll(Arrays.asList(paramId));
	this.listBase.addAll(Arrays.asList(paramBase));
}
private Collection<String> result;

public abstract String help();

protected AnalysisCommand parsing;

protected HashMap<String,Object> argsMap = new HashMap<String,Object>();

protected VerifyParameterException ex = new VerifyParameterException("");

//Parameters, using in Command`s Verification
private static final String[] paramAirports={"fromPort","toPort"};
private static final String[] paramAircraft={"airplane"};
private static final String[] paramBetweenDate={"fromDate","toDate"};
private static final String[] paramDate={"date"};
private static final String[] paramId={"id"};
private static final String[] paramBase={"base"};

protected List<String> listAirports=new LinkedList<String>();
protected List<String> listAircraft=new LinkedList<String>();
protected List<String> listBetweenDate=new LinkedList<String>();
protected List<String> listDate=new LinkedList<String>();
protected List<String> listId=new LinkedList<String>();
protected List<String> listBase=new LinkedList<String>();
}
